<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<div id="id1">
  123
</div>

<script>
  var id1 = document.getElementById('id1');
</script>

</body>
</html>